﻿using System;
using System.Collections.Generic;
using System.Linq;
using Xenta.Entities;

namespace Xenta.Tests
{
    public static class NHMappings
    {
        public static readonly IEnumerable<Type> CORE = new[]
        {
            typeof(GenericAttributeMapping),
            typeof(LookupAttributeMapping),
            typeof(TLookupAttributeMapping),
            typeof(LogRecordMapping),
            typeof(SettingMapping),
            typeof(LanguageMapping),
            typeof(LanguagePackMapping),
            typeof(CurrencyMapping),
            typeof(TimeZoneMapping),
            typeof(MeasureUnitMapping),
            typeof(CountryMapping),
            typeof(RegionMapping),
            typeof(LocalizationProfileMapping),
            typeof(MessageMapping),
            typeof(MessageTemplateMapping),
            typeof(TMessageTemplateMapping),
            typeof(AccountMapping),
            typeof(AccountAttributeMapping),
            typeof(AccountCommentMapping),
            typeof(RoleMapping),
            typeof(SessionMapping),
            typeof(PermissionMapping),
            typeof(FileOwnerMapping),
            typeof(FileMapping),
            typeof(FileGroupMapping),
            typeof(TFileGroupMapping),
            typeof(FileFolderMapping),
            typeof(TFileFolderMapping),
            typeof(CommentMapping),
            typeof(RatingMapping)
        };

        public static readonly IEnumerable<Type> FORUM = new[] 
        { 
            typeof(ForumMemberMapping),
            typeof(ForumPostMapping),
            typeof(ForumTopicMapping),
            typeof(ForumMapping),
            typeof(ForumRankMapping),
            typeof(ForumAccessRuleMapping),
            typeof(TForumMapping),
            typeof(TForumRankMapping)
        };

        public static readonly IEnumerable<Type> PUBLISHING = new[] 
        { 
            typeof(PublicationAuthorMapping),
            typeof(PublicationMapping),
            typeof(TPublicationMapping),
            typeof(PublicationTagMapping),
            typeof(TPublicationTagMapping),
            typeof(PublicationRatingMapping),
            typeof(PublicationCommentMapping)
        };

        public static readonly IEnumerable<Type> CATALOG = new[] 
        { 
            typeof(AddressMapping),
            typeof(CatalogCategoryMapping),
            typeof(CatalogItemMapping),
            typeof(CatalogItemGroupMapping),
            typeof(CatalogItemSpecMapping),
            typeof(CatalogItemDimensionalSpecMapping),
            typeof(CatalogManagerMapping),
            typeof(CatalogSupplierAddressMapping),
            typeof(CatalogSupplierMapping),
            typeof(CatalogTagMapping),
            typeof(CatalogSupplierCommentMapping),
            typeof(CatalogSupplierRatingMapping),
            typeof(CatalogItemCommentMapping),
            typeof(CatalogItemRatingMapping),
            typeof(TCatalogCategoryMapping),
            typeof(TCatalogTagMapping),
            typeof(TCatalogItemMapping),
            typeof(TCatalogSupplierMapping),
            typeof(TCatalogItemGroupMapping)
        };

        public static readonly IEnumerable<Type> SALES = new[] 
        { 
            typeof(AddressMapping),
            typeof(SellerMapping),
            typeof(SellerAddressMapping),
            typeof(SellerCommentMapping),
            typeof(SellerRatingMapping),
            typeof(CustomerMapping),
            typeof(CustomerAddressMapping),
            typeof(SalesItemMapping),
            typeof(SalesItemAttributeMapping),
            typeof(SalesOptionMapping),
            typeof(SalesRuleMapping),
            typeof(SalesRuleHistoryMapping),
            typeof(FixedTaxRuleMapping),
            typeof(FixedDiscountRuleMapping),
            typeof(TSalesOptionMapping),
            typeof(OrderMapping),
            typeof(OrderAttributeMapping),
            typeof(OrderCommentMapping),
            typeof(OrderItemMapping),
            typeof(OrderItemAttributeMapping),
            typeof(ShoppingCartMapping),
            typeof(ShoppingCartItemMapping),
            typeof(InvoiceMapping),
            typeof(PaymentMapping),
            typeof(PaymentAttributeMapping),
            typeof(StockEntryMapping),
            typeof(VolumeDiscountRuleMapping)
        };

        public static readonly IEnumerable<Type> ALL = CORE
            .Union(FORUM)
            .Union(PUBLISHING)
            .Union(CATALOG)
            .Union(SALES);
    }
}
